#include<stdio.h>
struct queue
{
	int a[100];
	int head;
	int tail;
};

int main()
{
	char temp; 
	struct queue q;
	q.head=0;
	q.tail=0;
	while( ( temp=getchar() )!='\n' )
		q.a[q.tail++]=temp-'0' ;
	while( q.head<q.tail )
	{
		printf("%d",q.a[q.head++]);
		q.a[q.tail++]=q.a[q.head];
		q.head++;
	}
	printf("\n");
	return 0;
}
